<template>
	<view class="content" v-html='content'>
		
	</view>
</template>

<script>
	import {getArticle} from '../../request/api.js'
	export default {
		data() {
			return {
				content:''
			};
		},
		onLoad(option) {
			let name;
			if(option.type=='driver_apply_content'){
				name='司機註冊協議'
			}else if(option.type=='privacy_policy'){
				name='司機隱私政策'
			}
			uni.setNavigationBarTitle({
				title: name
			})
			this.getInfor(option.type)
		},
		methods:{
			async getInfor(e){
				uni.showLoading({
					title:'加載中...'
				})
				let res=await getArticle({
					type:e
				})
				uni.hideLoading();
				this.content=res.data;
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color:#FAFAFA;
		.content{
			width:702rpx;margin-left:auto;
			margin-right:auto;
			padding-top:24rpx;
		}
	}
</style>
